<?php
/**
 * Whiskey framework
 * @author Clem Bradley
 * @version 0.1
 */

/**
 * Used to track script execution time
 */
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;


/*
 * Start the output buffer
 */
ob_start();

/*
 * Start the session
 */
session_start();



/*
 * Set Whiskey to display errors
 */
ini_set('display_errors', 1);
error_reporting(E_ALL);


/**
 * Defines the root path of the framework
 */
define("ROOT", realpath(dirname(__FILE__))."/");

/*
 * Autoload the necessary core classes
 */
function __autoload($class_name)
{
    print '<br>Auto load called for '.$class_name;
    require_once 'core/'.$class_name.'.php';
}



/*
 * Fire up the engines..
 */
require ROOT.'core/Whiskey.php';


/**
 * Used to track script execution time
 */
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
print 'Page generated in '.$total_time.' seconds.'."\n";
